home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / InterLaunch 1.1.2 / src / apple.c next >
Text File  |  1995-03-29  |  1KB  |  73 lines

  1. /* ----------------------------------------------------------------------
  2. apple.c
  3. ---------------------------------------------------------------------- */
  4.  
  5. #include    "the_defines.h"
  6. #include    "the_globals.h"
  7. #include    "the_prototypes.h"
  8.  
  9. /* ----------------------------------------------------------------------
  10. DoMenuApple
  11. ---------------------------------------------------------------------- */
  12. void DoMenuApple(theItem)
  13. int theItem;
  14. {
  15.     switch (theItem)
  16.     {
  17.         case APPLE_ABOUT:
  18.             AppleAbout();
  19.             break;
  20.         default:
  21.             AppleDA(theItem);
  22.             break;
  23.     }
  24.     
  25. }
  26.  
  27. /* ----------------------------------------------------------------------
  28. AppleAbout
  29. ---------------------------------------------------------------------- */
  30. void AppleAbout()
  31. {
  32.     DialogPtr myDialog;
  33.     short    itemHit;
  34.     Boolean aboutDone = false;
  35.     Boolean modaling;
  36.  
  37.     myDialog = GetNewDialog(DLOG_ABOUT,0,(WindowPtr) -1);
  38.     if (myDialog)
  39.     {
  40.         do
  41.         {
  42.             ShowWindow(myDialog);
  43.             ModalDialog(NIL,&itemHit);
  44.             switch(itemHit)
  45.             {
  46.                 case DLOG_ABOUT_OK:
  47.                     aboutDone = true;
  48.                     break;
  49.                 case DLOG_ABOUT_PICT:
  50.                     aboutDone = true;
  51.                     break;
  52.             }
  53.         }
  54.         while (!aboutDone);
  55.         DisposeDialog(myDialog);
  56.         DoUpdate();
  57.     }
  58. }
  59.  
  60. /* ----------------------------------------------------------------------
  61. AppleDA
  62. ---------------------------------------------------------------------- */
  63. void AppleDA(theItem)
  64. int theItem;
  65. {
  66.     Str255    accName;
  67.     int        accNumber;
  68.  
  69.     GetItem(gAppleMenu,theItem,accName);
  70.     accNumber = OpenDeskAcc(accName);
  71.  
  72. }
  73.